import requests
import json
import sys  
from PyQt5.QtWidgets import QApplication, QDialog
import Ui_result


class resultwindow(QDialog):
    def __init__(self,mbtitext,parent=None):  
        super(resultwindow, self).__init__(parent)  
        self.ui =Ui_result.Ui_Dialog() 
        
        self.ui.setupUi(self)
        
        self.ui.pushButton.clicked.connect(self.open_web)
        self.ui.pushButton.setText("查看合适的职业")
        
        labeltext='您的性格测试结果为\n\t'+mbtitext
        self.ui.label.setText(labeltext)
    def open_web(self):
        self.close()

if __name__ == '__main__':
    app = QApplication(sys.argv)  
    mainWin = resultwindow('INFP')  
    mainWin.show() 
    sys.exit(app.exec_())